<!DOCTYPE html>
<html>
	<head>
		<title>分页控件</title>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" type="text/css" href="./paging.css">
	</head>
	<body>
	<div id="pageTool"></div>
		<script type="text/javascript" src="./require.js"></script>
		<script>
		requirejs.config({
			paths: {
				'$':"jquery",
				'paging':"paging"
			},
			shim:{
				"$":{
					export:'jQuery'
				}
			}
		});
		require(["jQuery","paging"], function($,Paging){
			var page = new Paging();
			page.init({target:'#pageTool',pagesize:10,count:90,callback:function (pagecount, size, count){
					alert('当前第 ' + pagecount + '页,每页 ' + size + '条,总页数：' + count + '页');
					
					//如果你不用ajax分页，你可以直接在这里location.href='xxx.html?page='+pagecount 作跳转，这样的话，页面刷新后，你要传递current进来。
					// page.render({current: 2 });
				}
			});
		});
		</script>
	</body>
</html>